<template>
  <div  class="chart-container" ref="chartRef" >LineChart</div>
</template>

<script lang="ts">
export default {
  name: "LineChart",
};
</script>

<script lang="ts" setup>
import * as echarts from "echarts"
import { ref,onMounted } from "vue";

const chartRef=ref()

onMounted(()=>{
  const myEcharts=echarts.init(chartRef.value)
  const option={
    xAxis: {
      data: [
        "一月",
        "二月",
        "三月",
        "四月",
        "五月",
        "六月",
        "七月",
        "八月",
        "九月",
        "十月",
        "十一月",
        "十二月",
      ],
    
      boundaryGap: false
    },
    yAxis:{
      show:false
    },
    series:{
      type:"line",
      data: [25, 15, 46, 20, 14, 35, 15, 46, 20, 34, 34, 13],
      areaStyle:{
      color: "#a64ca6",
        opacity: 1,
    },
    smooth:true,
    itemStyle:{
      opacity: 0,
    },
    lineStyle:{
      color:"rgba(0, 0, 0, 0)",
    }
    },
    grid:{
      top:0,
      bottom:0,
      left:0,
      right:0
    },
 
    
  }
  myEcharts.setOption(option)
})
 
</script>

<style scoped>
  .chart-container {
  height: 100%;
}
</style>